﻿<UserControl x:Class="SBPweb.MediaCenter.Modules.Viewer.WPF.Controls.Toolbar"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            Height="80">
    <UserControl.Resources>
        <ControlTemplate x:Key="normalButtonTemplate" TargetType="Button">
            <ContentPresenter x:Name="Contents"
                              HorizontalAlignment="Center"
                              VerticalAlignment="Center"
                              Width="48"
                              Height="48"
                              Cursor="Hand"
                              MouseEnter="Contents_MouseEnter"
                              MouseLeave="Contents_MouseLeave"
                              MouseDown="Contents_MouseDown"
                              MouseUp="Contents_MouseUp">
                <ContentPresenter.BitmapEffect>
                    <OuterGlowBitmapEffect x:Name="Glow" GlowColor="Yellow" GlowSize="10" Opacity="0" />
                </ContentPresenter.BitmapEffect>
            </ContentPresenter>
            <!--ControlTemplate.Resources>
                <Storyboard x:Key="MouseEnterTimeLine">
                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Contents" Storyboard.TargetProperty="Width">
                        <SplineDoubleKeyFrame KeyTime="00:00:00.1" Value="64"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Contents" Storyboard.TargetProperty="Height">
                        <SplineDoubleKeyFrame KeyTime="00:00:00.1" Value="64"/>
                    </DoubleAnimationUsingKeyFrames>
                </Storyboard>
                <Storyboard x:Key="MouseLeaveTimeLine">
                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Contents" Storyboard.TargetProperty="Width">
                        <SplineDoubleKeyFrame KeyTime="00:00:00.3" Value="48"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Contents" Storyboard.TargetProperty="Height">
                        <SplineDoubleKeyFrame KeyTime="00:00:00.3" Value="48"/>
                    </DoubleAnimationUsingKeyFrames>
                </Storyboard>
                <Storyboard x:Key="MouseDownTimeLine">
                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Glow" Storyboard.TargetProperty="Opacity">
                        <SplineDoubleKeyFrame KeyTime="00:00:00.05" Value="1"/>
                    </DoubleAnimationUsingKeyFrames>
                </Storyboard>
                <Storyboard x:Key="MouseUpTimeLine">
                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Glow" Storyboard.TargetProperty="Opacity">
                        <SplineDoubleKeyFrame KeyTime="00:00:00.3" Value="0"/>
                    </DoubleAnimationUsingKeyFrames>
                </Storyboard>
            </ControlTemplate.Resources>
            <ControlTemplate.Triggers>
                <Trigger Property="IsPressed" Value="True">
                    <Trigger.EnterActions>
                        <BeginStoryboard Storyboard="{StaticResource MouseDownTimeLine}"/>
                    </Trigger.EnterActions>
                    <Trigger.ExitActions>
                        <BeginStoryboard Storyboard="{StaticResource MouseUpTimeLine}"/>
                    </Trigger.ExitActions>
                </Trigger>
                <Trigger Property="IsMouseOver" Value="True">
                    <Trigger.EnterActions>
                        <BeginStoryboard Storyboard="{StaticResource MouseEnterTimeLine}"/>
                    </Trigger.EnterActions>
                    <Trigger.ExitActions>
                        <BeginStoryboard Storyboard="{StaticResource MouseLeaveTimeLine}"/>
                    </Trigger.ExitActions>
                </Trigger>
            </ControlTemplate.Triggers-->
        </ControlTemplate>
        <ControlTemplate x:Key="normalSeparatorTemplate" TargetType="Separator">
            <ContentPresenter x:Name="Separator"
                              HorizontalAlignment="Center"
                              VerticalAlignment="Center"
                              Width="5"
                              Height="64" />
        </ControlTemplate>
        <Style x:Key="normalGroupBoxStyle" TargetType="GroupBox">
            <Setter Property="BorderThickness" Value="0.2" />
            <Setter Property="Foreground" Value="White" />
        </Style>
    </UserControl.Resources>
    <StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
        <StackPanel.BitmapEffect>
            <DropShadowBitmapEffect ShadowDepth="1" Softness="0.5" />
        </StackPanel.BitmapEffect>
        <GroupBox Header="File" Style="{StaticResource normalGroupBoxStyle}">
            <StackPanel Orientation="Horizontal">
                <Button Name="bOpen" Template="{StaticResource normalButtonTemplate}" Click="bOpen_Click" IsEnabledChanged="Contents_IsEnabledChanged">
                    <Image Source="/SBPweb.MediaCenter.Modules.Viewer.WPF;component/Resources/Folder-Secure.ico" />
                </Button>
                <Button Name="bInfo" Template="{StaticResource normalButtonTemplate}" IsEnabledChanged="Contents_IsEnabledChanged">
                    <Image Source="/SBPweb.MediaCenter.Modules.Viewer.WPF;component/Resources/Symbol-Information.ico" />
                </Button>
                <Button Name="bSave" Template="{StaticResource normalButtonTemplate}" IsEnabledChanged="Contents_IsEnabledChanged">
                    <Image Source="/SBPweb.MediaCenter.Modules.Viewer.WPF;component/Resources/Save.ico" />
                </Button>
                <Button Name="bDelete" Template="{StaticResource normalButtonTemplate}" IsEnabledChanged="Contents_IsEnabledChanged">
                    <Image Source="/SBPweb.MediaCenter.Modules.Viewer.WPF;component/Resources/Symbol-Delete.ico" />
                </Button>
            </StackPanel>
        </GroupBox>
        <Separator Template="{StaticResource normalSeparatorTemplate}" />
        <GroupBox Header="Edit" Style="{StaticResource normalGroupBoxStyle}">
            <StackPanel Orientation="Horizontal">
                <Button Name="bCopy" Template="{StaticResource normalButtonTemplate}" IsEnabledChanged="Contents_IsEnabledChanged">
                    <Image Source="/SBPweb.MediaCenter.Modules.Viewer.WPF;component/Resources/Copy.ico" />
                </Button>
                <Button Name="bCut" Template="{StaticResource normalButtonTemplate}" IsEnabledChanged="Contents_IsEnabledChanged">
                    <Image Source="/SBPweb.MediaCenter.Modules.Viewer.WPF;component/Resources/Cut.ico" />
                </Button>
                <Button Name="bPaste" Template="{StaticResource normalButtonTemplate}" IsEnabledChanged="Contents_IsEnabledChanged">
                    <Image Source="/SBPweb.MediaCenter.Modules.Viewer.WPF;component/Resources/Paste.ico" />
                </Button>
                <Button Name="bUndo" Template="{StaticResource normalButtonTemplate}" IsEnabledChanged="Contents_IsEnabledChanged">
                    <Image Source="/SBPweb.MediaCenter.Modules.Viewer.WPF;component/Resources/Undo.ico" />
                </Button>
            </StackPanel>
        </GroupBox>
        <Separator Template="{StaticResource normalSeparatorTemplate}" />
        <GroupBox Header="Zoom" Style="{StaticResource normalGroupBoxStyle}">
            <StackPanel Orientation="Horizontal">
                <Button Name="bZoomIn" Template="{StaticResource normalButtonTemplate}" IsEnabledChanged="Contents_IsEnabledChanged">
                    <Image Source="/SBPweb.MediaCenter.Modules.Viewer.WPF;component/Resources/Zoom-in.ico" />
                </Button>
                <Button Name="bZoomOut" Template="{StaticResource normalButtonTemplate}" IsEnabledChanged="Contents_IsEnabledChanged">
                    <Image Source="/SBPweb.MediaCenter.Modules.Viewer.WPF;component/Resources/Zoom-out.ico" />
                </Button>
            </StackPanel>
        </GroupBox>
        <Separator Template="{StaticResource normalSeparatorTemplate}" />
        <GroupBox Header="Order" Style="{StaticResource normalGroupBoxStyle}">
            <StackPanel Orientation="Horizontal">
                <Button Name="bPrev" Template="{StaticResource normalButtonTemplate}" Click="bPrev_Click" IsEnabledChanged="Contents_IsEnabledChanged">
                    <Image Source="/SBPweb.MediaCenter.Modules.Viewer.WPF;component/Resources/Arrow-Right.ico" />
                </Button>
                <Button Name="bNext" Template="{StaticResource normalButtonTemplate}" Click="bNext_Click" IsEnabledChanged="Contents_IsEnabledChanged">
                    <Image Source="/SBPweb.MediaCenter.Modules.Viewer.WPF;component/Resources/Arrow-Left.ico" />
                </Button>
                <Button Name="bUp" Template="{StaticResource normalButtonTemplate}" IsEnabledChanged="Contents_IsEnabledChanged">
                    <Image Source="/SBPweb.MediaCenter.Modules.Viewer.WPF;component/Resources/Arrow-Up.ico" />
                </Button>
                <Button Name="bDown" Template="{StaticResource normalButtonTemplate}" IsEnabledChanged="Contents_IsEnabledChanged">
                    <Image Source="/SBPweb.MediaCenter.Modules.Viewer.WPF;component/Resources/Arrow-Down.ico" />
                </Button>
            </StackPanel>
        </GroupBox>
    </StackPanel>
</UserControl>
